/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import db.DAOTest;

/**
 *
 * @author owner
 */
@ManagedBean
@SessionScoped
public class ActivityBean {
    private Integer id = 0;

    public ActivityBean() {super();}

    public ActivityBean(int id)
    {
        super();
        this.id = id;
    }

    public void setId(Integer id)
    {
        if (id != null)
            this.id = id;
        else
            this.id = 0;
    }

    public Integer getId()
    {
        return id;
    }

    public String access()
    {
        if (DAOTest.activityExists(this))
            return "dbtestSuccess";
        else
            return "dbtestFailure";
    }
}
